package com.ly.friend.controller.question.file;

import com.ly.common.core.domain.R;
import com.ly.common.file.domain.OSSResult;
import com.ly.friend.service.file.ISysFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("/file")
public class FileController {

    @Autowired
    private ISysFileService SysFileService;
    @PostMapping("/upload")
    public R<OSSResult> upload(@RequestBody MultipartFile file){
        return R.ok(SysFileService.upload(file));
    }

}
